From 5e504b74371410e81e88f433eb8f4cfc36119b28 Mon Sep 17 00:00:00 2001 From: Julien Grall Date: Thu, 15 Sep 2016 12:28:21 +0100 Subject: [PATCH] xen/arm: p2m: Add a back pointer to domain in p2m_domain The back pointer will be usefult later to get the domain when we only have the p2m in hand. Signed-off-by: Julien Grall Acked-by: Stefano Stabellini Tested-by: Tamas K Lengyel --- xen/arch/arm/p2m.c | 1 + xen/include/asm-arm/p2m.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index fe0ed9fd3e..2bddcd7a46 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -1391,6 +1391,7 @@ int p2m_init(struct domain *d) if ( rc != 0 ) return rc; + p2m->domain = d; p2m->max_mapped_gfn = _gfn(0); p2m->lowest_mapped_gfn = _gfn(ULONG_MAX); diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index d0dae2e2f4..44450455da 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -81,6 +81,9 @@ struct p2m_domain { * enough available bits to store this information. */ struct radix_tree_root mem_access_settings; + + /* back pointer to domain */ + struct domain *domain; }; /* -- 2.30.2